#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <string.h>

int main(int argc, char const *argv[])
{
    char* name = "/tmp/myfifo";
    int fid = open(name,O_RDWR);
    char buf[1024];
    int char_nums = 0;
    while((char_nums = read(fid,buf,1024))>0)
    {
        printf("you say %s\n",buf);
    }
    printf("fifo read success");
    close(fid);
    return 0;
}